package com.carl.generate.model.impl;

import com.liferay.portal.kernel.util.GetterUtil;

import java.io.Serializable;

import java.sql.Types;


public class ReportsEntryModelImpl {
    public static final String TABLE_NAME = "ReportsEntry";
    public static final Object[][] TABLE_COLUMNS = {
            { "entryId", new Integer(Types.VARCHAR) },
            

            { "name", new Integer(Types.VARCHAR) }
        };
    public static final String TABLE_SQL_CREATE = "create table ReportsEntry (entryId  not null primary key,name  null)";
    public static final String TABLE_SQL_DROP = "drop table ReportsEntry";
    public static final String DATA_SOURCE = "liferayDataSource";
    public static final String SESSION_FACTORY = "liferaySessionFactory";
    public static final String TX_MANAGER = "liferayTransactionManager";
    private String _entryId;
    private String _originalEntryId;
    private String _name;

    public ReportsEntryModelImpl() {
    }

    public String getPrimaryKey() {
        return _entryId;
    }

    public void setPrimaryKey(String pk) {
        setEntryId(pk);
    }

    public Serializable getPrimaryKeyObj() {
        return _entryId;
    }

    public String getEntryId() {
        return GetterUtil.getString(_entryId);
    }

    public void setEntryId(String entryId) {
        _entryId = entryId;

        if (_originalEntryId == null) {
            _originalEntryId = entryId;
        }
    }

    public String getOriginalEntryId() {
        return GetterUtil.getString(_originalEntryId);
    }

    public String getName() {
        return GetterUtil.getString(_name);
    }

    public void setName(String name) {
        _name = name;
    }

    public int hashCode() {
        return getPrimaryKey().hashCode();
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();

        sb.append("{entryId=");
        sb.append(getEntryId());
        sb.append(", name=");
        sb.append(getName());
        sb.append("}");

        return sb.toString();
    }

    public String toXmlString() {
        StringBuilder sb = new StringBuilder();

        sb.append("<model><model-name>");
        sb.append("com.carl.generate.model.ReportsEntry");
        sb.append("</model-name>");

        sb.append(
            "<column><column-name>entryId</column-name><column-value><![CDATA[");
        sb.append(getEntryId());
        sb.append("]]></column-value></column>");
        sb.append(
            "<column><column-name>name</column-name><column-value><![CDATA[");
        sb.append(getName());
        sb.append("]]></column-value></column>");

        sb.append("</model>");

        return sb.toString();
    }
}
